$(document).ready(function(){
	var pieweek1 = parseInt($('#pieweek1').val());
	var pieweek2 = parseInt($('#pieweek2').val());
	var pieweek3 = parseInt($('#pieweek3').val());
	
	var piemonth1 = parseInt($('#piemonth1').val());
	var piemonth2 = parseInt($('#piemonth2').val());
	var piemonth3 = parseInt($('#piemonth3').val());
    
  var data = [
    ['Heavy Industry', pieweek1],['Retail', pieweek2], ['Light Industry', pieweek3]
  ];
  var plot1 = jQuery.jqplot ('chart1', [data], {
	seriesDefaults: {
        // Make this a pie chart.
        renderer: jQuery.jqplot.PieRenderer, 
        rendererOptions: {
          // Put data labels on the pie slices.
          // By default, labels show the percentage of the slice.
          showDataLabels: true,
		  shadowOffset: 0,
		shadowAlpha: 0,
		shadowDepth: 0,
		drawBorder: false,
		shadow: false
        }
      }, 
      legend: { show:false, location: 'e' },
	  grid:{shadow:false, borderWidth:0},
	  seriesColors: ["#b4dbeb", "#8cc7e0", "#64b4d5", "#3b9dc6", "#2085af", "#0d6c94"]
    }
  );
  
    var data = [
    ['Heavy Industry', piemonth1],['Retail', piemonth2], ['Light Industry', piemonth3]
  ];
  var plot1 = jQuery.jqplot ('chart2', [data], 
    { 
      seriesDefaults: {
        // Make this a pie chart.
        renderer: jQuery.jqplot.PieRenderer, 
        rendererOptions: {
          // Put data labels on the pie slices.
          // By default, labels show the percentage of the slice.
          showDataLabels: true,
		  shadowOffset: 0,
		shadowAlpha: 0,
		shadowDepth: 0,
		drawBorder: false,
		shadow: false
        }
      }, 
      legend: { show:false, location: 'e' },
	  grid:{shadow:false, borderWidth:0},
	  seriesColors: ["#b4dbeb", "#8cc7e0", "#64b4d5", "#3b9dc6", "#2085af", "#0d6c94"]
    }
  );
  
});